package com.gmail.dukenukemshawn12;

import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;

public class Damage extends BukkitRunnable{
	public Damage(Player p){
		this.p = p;
	}
	private Player p;
	@Override
	public void run() {
		if(p.getLocation().getBlock().getType().equals(Material.WEB)){
			p.damage(2);
		}
		else{
			this.cancel();
		}
	}

}
